package nuc.ss.wl.service.impl;

import nuc.ss.wl.dao.CCDao;
import nuc.ss.wl.dao.impl.CCDaoImpl;
import nuc.ss.wl.entity.CC;
import nuc.ss.wl.service.CCService;

import java.util.List;

public class CCServiceImpl implements CCService {

    private CCDao ccDao = new CCDaoImpl();
    @Override
    public int add(CC cc) {
        return this.ccDao.save(cc);
    }

    @Override
    public int delete(int classno, int cno) {
        return this.ccDao.delete(classno, cno);
    }

    @Override
    public int update(CC cc) {
        return this.ccDao.update(cc);
    }

    @Override
    public List<CC> findAll() {
        return this.ccDao.findAll();
    }

    @Override
    public CC findByClassnoAndCno(int classno, int cno) {
        return this.ccDao.findByClassnoAndCno(classno, cno);
    }
}
